import { Flex } from "antd"

type Props ={
    title:string,
    children?: React.ReactNode
}
export const Title = ({title,children}:Props)=>{
    return (
        <Flex 
        justify="center"
        align="center"
        style={{
            padding: 50,
            backgroundImage:"linear-gradient(#fff,#ccc)",
            position:"relative"
        }}
        >
            {/* 头部展示 */}
            <div style={{ position: "absolute", left:20 }}>{title}</div>
            {/* 中间展示的区域 */}
            {children}
        </Flex>
    )
}